//
//  Shader.fsh
//  Renderbunny
//
//  Created by Holmes Futrell on 1/20/11.
//  Copyright 2011 Holmes Futrell. All rights reserved.
//

uniform sampler2D sampler;

uniform bool alphaOnly;

varying vec2 uv;

void main()
{
	if (alphaOnly) {
		float alpha = texture2D(sampler, uv).a;
		gl_FragColor = vec4(alpha, alpha, alpha, 1.0);
	}
	else {
		gl_FragColor = vec4(texture2D(sampler, uv).rgba);
	}
}